package com.fcx.workai.home_module.ui;

import android.content.Intent;
import android.os.Bundle;

import com.donkingliang.imageselector.utils.ImageSelectorUtils;
import com.fcx.workai.home_module.R;
import com.hxh.component.basicore.component.mvp.persenter.IPresenter;
import com.hxh.component.basicore.component.mvp.view.BaseActivity;
import com.hxh.component.basicore.util.Utils;
import com.hxh.component.business.utils.Constant;

import java.util.ArrayList;

import me.yokeyword.fragmentation.anim.DefaultHorizontalAnimator;
import me.yokeyword.fragmentation.anim.FragmentAnimator;



public class HomeMainActivity extends BaseActivity {

    public static final String BUNDLE_FROM_TAG = "bundle_from_tag";
    public static final String BUNDLE_IS_BIND_IDCARD = "is_bind_idcard";

    @Override
    public int getLayoutId() {
        return R.layout.activity_main_home;
    }

    @Override
    public void initData(Bundle saveInstanceState) {
        String tag = getExtra_String(Constant.RouterTag.SHOWTAG);

        showFragmentForTag(tag);
    }

    private void showFragmentForTag(String tag) {
        switch (tag) {

        }
    }

    @Override
    public FragmentAnimator onCreateFragmentAnimator() {
        return new DefaultHorizontalAnimator();
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == Utils.IntentUtil.INTENT_REQUEST_OPEN_PICK && data != null) {
            //获取选择器返回的数据
            ArrayList<String> images = data.getStringArrayListExtra(ImageSelectorUtils.SELECT_RESULT);

        } else if (requestCode == Utils.IntentUtil.INTENT_REQUEST_OPEN_CAMERA) {
            //mCameraSaveFilePath
        }
    }

    @Override
    public IPresenter newP() {
        return null;
    }
}
